package com.service.impl;

import com.dao.CheckoutDao;
import com.pojo.Checkout;
import com.service.CheckoutService;
import com.vo.CheckoutVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author mornd
 * @date 2020/12/4 - 17:25
 */
@Service
@Transactional
public class CheckoutServiceImpl implements CheckoutService {
    @Autowired
    private CheckoutDao checkoutDao;
    /**
     * 查询退房记录
     *
     * @param checkoutVo
     * @return
     */
    @Override
    public List<Checkout> findCheckoutList(CheckoutVo checkoutVo) {
        return checkoutDao.findCheckoutList(checkoutVo);
    }

    /**
     * 添加退房记录
     *
     * @param checkout
     * @return
     */
    @Override
    public int addCheckout(Checkout checkout) {
        return checkoutDao.addCheckout(checkout);
    }
}
